// 用户API
import request from '@/utils/request.js'

export const getUserAPI = () => {
  return request.get('/my/userinfo')
}

// 获取左侧菜单数据的接口
export const getMenusAPI = () => {
  return request.get('/my/menus')
}

// 更新用户信息的API
export const updataUserAPI = (obj) => {
  return request.put('/my/userinfo', obj)
}

export const updateAvatarAPI = (avatar) => {
  return request.patch('/my/update/avatar', { avatar })
}

export const updatePwdAPI = (obj) => {
  return request.patch('/my/updatepwd', obj)
}
